<?php
defined( '_JEXEC' ) or die( 'Restricted access' );
?>
<?php
$user 	=& JFactory::getUser();
if ( $user->get('guest')) {
?>

<div>
  <div class="bg_pup5">
    <div class="boder_bt p10t p5b p14l p12r ">
      <p class="text_tt3 float_left p5t p10l">Fakta-boks </p>
      <!--<p class="text_tt2 float_right"><a href="#"><img src="templates/xescort/images/bt_close.png"></a></p>--> 
      <br class="cb">
    </div>
    <div class=" p45l p17t"> Please login! </div>
  </div>
</div>
<?php	
}else{
	
?>
<div>
  <div class="bg_pup4">
    <div class="boder_bt p10t p5b p14l p12r ">
      <p class="text_tt3 float_left p5t p10l">Service</p>
      <!--<p class="text_tt2 float_right"><a href="#"><img src="images/bt_close.png"></a></p>-->
      <p><br class="cb">
      </p>
    </div>
    <div class="p12t p35l p26r">
      <form action="<?php echo JRoute::_('index.php'); ?>" class="form-validate" method="post" name="addServicesFrm" id="addServicesFrm">
        <?php
		
		if(count($this->services)){
		foreach($this->services as $key=>$value ){
	?>
        <label>
          <input type="checkbox" id="CheckboxGroup<?php echo $key; ?>" value="<?php echo $value->id; ?>" name="CheckboxGroup[]" <?php if($value->supported==1){ ?> checked="checked" <?php } ?>>
          <?php echo $value->name; ?></label>
        <?php
		}
		}
	?>
        <div class="cb"></div>
        <a href="javascript();" onclick="click_send(); return false;"><img src="templates/xescort/images/bt_gem.png"></a>
        <input type="submit" name="sendservices" id="sendservices" value="Send" style="display: none;" />
        <input type="hidden" name="task" value="update" />
        <input type="hidden" name="option" value="com_updateservices" />
        <input type="hidden" name="userid" value="<?php echo $user->get('id') ?>" />
        <?php echo JHTML::_( 'form.token' ); ?>
      </form>
    </div>
  </div>
</div>
<script language="javascript">
jQuery(document).ready(function($) {	
	click_send=function(){
		document.getElementById('sendservices').click();
	}
	//$("#dynamicfield").dynamicForm("#plus6", "#minus6", {limit:5,createColor:"red"});
});
</script>
<?php
}
?>
